import torch


def unstructed_pruner(data, threshold):
    mask = torch.abs(data) > threshold
    data = data * mask
    pruner_rate = torch.sum(mask)/data.numel()
    return data, pruner_rate





